package com.xbongbong.paas.manager.feign;

import com.xbongbong.paas.pojo.dto.UserInfoDTO;
import com.xbongbong.paas.pojo.vo.UserInfoVO;
import com.xbongbong.paas.toolbox.wrap.XbbResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 用户内部调用接口
 * @author kaka
 * @date  2018-10-15 15:41
 */
@FeignClient(name = "pro-web-pc",contextId = "userFeignClient")
public interface UserFeignClient {

    /**
     * 获取用户信息，包含基本信息，所在部门信息，角色信息
     * @param userInfoDTO 业务DTO
     * @return 返回用户基本信息，所在部门信息，角色信息
     */
    @RequestMapping(value = "/pro/v1/user/info", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
    XbbResponse<UserInfoVO> getUserInfo(@RequestBody UserInfoDTO userInfoDTO, @RequestParam("lang") String lang);

}
